# -*- coding: utf-8 -*-
"""
 @Time    : 2021/1/22 下午4:43
 @Author  : tgy
 
"""
import os
from scapy.all import *


def arp_request(ip, ifname='eth0', queue = None):
    ...
    res_raw = srp(Ether(dst='FF:FF:FF:FF:FF:FF')/ARP(op=1,hwdst='00:00:00:00:00:00',pdst=ip),timeout=1,iface=ifname,verbose=False)
    print(res_raw)



if __name__ == '__main__':
    ...
    # os.popen('sudo su - root')
    ea = Ether(dst='FF:FF:FF:FF:FF:FF')/ARP(op=1, hwdst='00:00:00:00:00:00')
    ea.show()
    # arp_request(ip='10.211.55.3', ifname='vnic0')

